<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/6/14
 * Time: 14:26
 */

use think\facade\Route;
use app\service\middleware\Token;

//登录

Route::group('login', function () {
    Route::post('login', 'login/login');//登录
    Route::post('login_mobile', 'login/loginMobile');//短信登录
    Route::get('sms', 'login/sendSms');//短信验证码
    Route::get('captcha', 'login/captcha');//验证码
});


//工作台1
Route::group('task', function () {
    Route::post('car_list', 'Task/carNoList');//车辆列表
    Route::post('change_car', 'Task/changeCarNo');//修改绑定车辆
    Route::post('list', 'Task/list');//任务列表
    Route::get('details', 'Task/detail');//任务详情
    Route::get('start', 'Task/start');//领取任务
    Route::get('end', 'Task/end');//结束任务
    Route::post('submit_img', 'Task/submitImg'); //上传配送凭证
    Route::post('del_img', 'Task/delImg'); //删除配送凭证
    Route::post('edit_position', 'Task/editPosition'); //修改门店位置信息
})->middleware(Token::class);

//我的
Route::group('my', function () {
    Route::get('amount', 'my/amount');//收益
    Route::get('withdraw', 'my/withdraw');//提现
    Route::get('withdraw_list', 'my/withdrawList');//提现列表
    Route::get('task_count', 'my/taskCount');//运营数据
    Route::get('lin_store_list', 'my/linStoreList');//路线网点列表
    Route::get('warehouse_list', 'my/warehouseList');//仓库列表
})->middleware(Token::class);

// 上传
Route::group('upload', function ()
{
    Route::post('file', 'Upload/upload');
});